
class Constant {
  static const String keyLanguage = 'key_language';
  static const String KEY_THEME_COLOR = 'key_theme_color';

  static const int PAGE_SIZE = 20;

  //OSC
  // oauth2_authorize : https://www.oschina.net/action/oauth2/authorize?response_type=code&client_id=eqSksiJWo0hvY53jPuCH&
  // redirect_uri=http://www.baidu.com/&state=123
  // oauth2_token : https://www.oschina.net/action/openapi/token?grant_type=authorization_code&client_id=eqSksiJWo0hvY53jPuCH&
  // client_secret=FxMYE4CGSSyK5SwANoXqUK4xYFwqsr46&redirect_uri=http://www.baidu.com/&code=ZdQdvc&state=123&dataType=json
  static const String OSC_OPEN_API_CLIENT_ID = "eqSksiJWo0hvY53jPuCH";
  static const String OSC_OPEN_API_CLIENT_SECRET = "FxMYE4CGSSyK5SwANoXqUK4xYFwqsr46";
  static const String OSC_OPEN_API_REDIRECT_URL = "http://www.baidu.com/";
  static const String OSC_OPEN_API_REDIRECT_URL_M = "https://m.baidu.com/";

  static const String OSC_OPEN_API_HOST_H5_URL = "https://h5.oschina.net/";
  static const String OSC_OPEN_API_HOST_URL = "https://www.oschina.net/";
  static const String OSC_OPEN_API_HOST_URL_WITHOUT_SPLASH = "https://www.oschina.net";
  static const String OSC_OPEN_API_OAUTH2_AUTHORIZE_URL = OSC_OPEN_API_HOST_URL + "action/oauth2/authorize?response_type=code&client_id="
      + OSC_OPEN_API_CLIENT_ID + "&redirect_uri=" + OSC_OPEN_API_REDIRECT_URL + "&state=1";
  static String GET_OSC_OPEN_API_OAUTH2_TOKEN_URL({String code, bool isRefreshToken = false, String refreshToken}) => OSC_OPEN_API_HOST_URL
      + "action/openapi/token?grant_type=" + (isRefreshToken? "refresh_token&refresh_token=$refreshToken":"authorization_code")
      + "&client_id=" + OSC_OPEN_API_CLIENT_ID
      + "&client_secret=" + OSC_OPEN_API_CLIENT_SECRET
      + "&redirect_uri=" + OSC_OPEN_API_REDIRECT_URL + "&code=" + code + "&state=1&dataType=json";

  static const OSC_IMAGE_PREFIX = "https://static.oschina.net/uploads/space/";
  static const OSC_IMAGE_POSTFIX = "!/sq/200";



  static const List<String> CATALOGS = ["所有", "软件", "话题", "博客", "新闻", "代码", "资讯", "翻译"];//0-所有|1-软件|2-话题|3-博客|4-新闻|5代码|6资讯|7-翻译
  /// 获取详情
  /// type 0-所有(打开url)|1-软件|2-问答|3-博客|4-翻译|5活动|6资讯|7-
  static const List<String> SKILLS = ["社区活跃度", "社区影响力", "技术贡献度", "活动活跃度", "开源贡献度", "学习积极性",];

  static const String USER_QR_CODE_PREFIX_HTTPS = "https://my.oschina.net/u/";
  static const String USER_QR_CODE_PREFIX_HTTP = "http://my.oschina.net/u/";


  static const String CUSTOMER_SHARE_SERVICE = "com.panda.customer.share";

}

class AppConfig {
  static const String appName = 'IT猿圈';
  static const String version = '0.1.3';
  static const bool isDebug = true;
}
